import { FormSchema } from '@/components/Table';
import { connectionStateEnum, connectionStateOptions } from '@/enums/connection'

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '名称',
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: 'state',
    label: '状态',
    component: 'Select',
    defaultValue: [connectionStateEnum.DRAFT, connectionStateEnum.ONGOING],
    componentProps: {
      options: connectionStateOptions,
      mode: 'multiple',
    },
    colProps: { span: 8 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'partner_name',
    label: '企业名称',
    component: 'AutoComplete',
    required: true,
    slot: 'partner',
  },
  {
    field: 'time',
    component: 'RangePicker',
    label: '有效日期',
    required: true,
  },
];